﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="manager_edit.aspx.cs" Inherits="manager_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript">
      function hideTable()
      { 
        document.getElementById("table1").style.display='none';
      }
     function showTable()
     {
       document.getElementById("table1").style.display='block';    
     }
    </script>
</head>
<body >
    <form id="form1" runat="server">
      <div>
        <table style="margin:0 auto">
          <tr>
            <td style=" margin:0 auto; width:521px; height:30px; text-align:center; font-size:x-large; background-color: #33CCFF" >
            管理员信息
            </td>
          </tr>
          <tr>
            <td>
                <asp:GridView  id="ManagerList" runat="server" Width="521px" 
                    AutoGenerateColumns="False" onrowcommand="ManagerList_RowCommand">
                <HeaderStyle HorizontalAlign="Left" />
				<Columns>
					<asp:BoundField HeaderText="管理员编号" DataField="Manager_Idint" Visible="false" />
                    <asp:BoundField HeaderText="用户名" DataField="Manager_Namestr" />
					<asp:BoundField HeaderText="密码" DataField="Manager_Passwordstr"  />	
					<asp:TemplateField  HeaderText="修改">  
                        <ItemTemplate>  
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="updateManager"   CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Manager_Idint")%>'   Text="编辑" ></asp:LinkButton>  
                        </ItemTemplate>  
                    </asp:TemplateField>         				           
					<asp:TemplateField  HeaderText="删除">  
                        <ItemTemplate>  
                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="deleteManager" 
                            CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Manager_Idint")%>'   Text="删除" OnClientClick='<%#  "if (!confirm(\"你确定要删除吗?\")) return false;"%>'></asp:LinkButton>  
                        </ItemTemplate>  
                    </asp:TemplateField>    
				</Columns>
				<PagerStyle HorizontalAlign="Left" ForeColor="#000066" BackColor="White" ></PagerStyle>
                </asp:GridView> 
            </td>
          </tr>
          <tr>
            <td style="text-align:center">
               <asp:LinkButton ID="pageFirst" runat="server" Text="首页" CommandArgument="First"></asp:LinkButton>
                &nbsp;
                <asp:LinkButton ID="pagePrev" runat="server" Text="上一页" CommandArgument="Prev"></asp:LinkButton>
                &nbsp;
                <asp:LinkButton ID="pageNext" runat="server" Text="下一页" CommandArgument="Next"></asp:LinkButton>
                &nbsp;
                <asp:LinkButton ID="pageLast" runat="server" Text="首页" CommandArgument="Last"></asp:LinkButton>
            </td>
          </tr>
        </table> 
        <div style=" height:20px"   >
       
        </div>
        <div >
        <asp:Panel ID="panel1" runat="server" Visible="false">
           <hr/>
           <hr />
          <table  id="table1"  style="margin:0 auto; border:solid 1px #33CCFF; " rules="all" >
            <tr>
              <td colspan="2" style="text-align:center; height:30px; background-color:#33CCFF">管理员信息</td>
            </tr>
            <tr>
              <td>用户名</td>       
              <td>
                  <asp:TextBox ID="name" ReadOnly="true" runat="server"></asp:TextBox>
              </td>
            </tr>
            <tr>
              <td>密  码</td>
              <td> 
                <asp:TextBox ID="password"  runat="server"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="password" ErrorMessage="不能为空" runat="server"></asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td>确认密码</td>
              <td> 
                <asp:TextBox ID="checkpassword" TextMode="Password"  runat="server"></asp:TextBox>
                <asp:CompareValidator ID="CompareValidator1" ControlToCompare="password" ControlToValidate="checkpassword" ErrorMessage="密码不一样" runat="server"></asp:CompareValidator>
              </td>
            </tr>
            <tr>
              <td colspan="2" style="text-align:center">
                <asp:Button Text="修改" runat="server" onclick="Unnamed1_Click" />
              </td>
            </tr>
          </table>
          </asp:Panel>
        </div>    
      </div>
    </form>
</body>
</html>
